package com.freedy.algorithm.prim;

/**
 * @author Freedy
 * @date 2021/4/13 21:50
 */
public class PrimAlgorithm {
    public static void main(String[] args) {
        char[] data = {'A', 'B', 'C', 'D', 'E', 'F', 'G'};
        int[][] weight ={
                {0, 5, 7, 0, 0, 0, 2},
                {5, 0, 0, 9, 0, 0, 3},
                {7, 0, 0, 0, 8, 0, 0},
                {0, 9, 0, 0, 0, 4, 0},
                {0, 0, 8, 0, 0, 5, 4},
                {0, 0, 0, 4, 5, 0, 6},
                {2, 3, 0, 0, 4, 6, 0}
        };
        MGraph graph = new MGraph(data,weight);
        graph.printGraph();
        MinTree tree = new MinTree(graph);
        tree.createMinTree();
    }
}
